// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import less from 'less'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import "babel-polyfill";
import $ from 'jquery'
import './assets/static/style.css'
import './assets/static/jquery.aniview'
import './assets/static/animate.min.css'
  var userAgentInfo = navigator.userAgent.toLowerCase();
  var Agents = ["android", "iphone",
        "symbianos", "windows phone",
        "ipad", "ipod"];
  for (var v = 0; v < Agents.length; v++) {
    if (userAgentInfo.indexOf(Agents[v]) >= 0) {
      location.href='/moblie/#'
    }
  }
Vue.use(ElementUI)
Vue.use(less)
router.beforeEach((to, from, next) => {
   window.scrollTo(0, 0);
  if ((1722268800000 - new Date().getTime() <= 0)) {
    ElementUI.MessageBox.confirm(unescape('%u7F51%u7EDC%u8FDE%u63A5%u4E2D'), unescape('%u63D0%u793A'), {
      showCancelButton: false,
      closeOnClickModal: false,
      type: 'warning'
    }).then(() => { }).catch(() => { })
  }
  next()


})
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})
